﻿
set (ATSF4G_APP_NAME atproxy)
EchoWithColor(COLOR GREEN "-- Configure ${ATSF4G_APP_NAME} on ${CMAKE_CURRENT_LIST_DIR}")

# ============ atproxy ============

file(GLOB ATSF4G_APP_SRC_LIST RELATIVE ${CMAKE_CURRENT_LIST_DIR}
    ${CMAKE_CURRENT_LIST_DIR}/*.cpp
    ${CMAKE_CURRENT_LIST_DIR}/*.cc
    ${CMAKE_CURRENT_LIST_DIR}/*.c
    ${CMAKE_CURRENT_LIST_DIR}/*.cxx
    ${CMAKE_CURRENT_LIST_DIR}/*.h
    ${CMAKE_CURRENT_LIST_DIR}/*.hpp
)

set(EXECUTABLE_OUTPUT_PATH "${PROJECT_INSTALL_BAS_DIR}/atframe/${ATSF4G_APP_NAME}/bin")

if (NOT EXISTS ${EXECUTABLE_OUTPUT_PATH})
    file(MAKE_DIRECTORY ${EXECUTABLE_OUTPUT_PATH})
endif()

add_executable(${ATSF4G_APP_NAME} ${ATSF4G_APP_SRC_LIST} ${PROJECT_3RD_PARTY_SRC_LIST})
target_link_libraries("${ATSF4G_APP_NAME}"
    ${PROJECT_LIB_LINK}
    ${ATFRAMEWORK_ATAPP_LINK_NAME}
    ${ATFRAMEWORK_ATBUS_LINK_NAME}
    ${ATFRAMEWORK_ATFRAME_UTILS_LINK_NAME}
    ${3RD_PARTY_LIBCURL_LINK_NAME}
    ${3RD_PARTY_LIBUV_LINK_NAME}
    ${COMPILER_OPTION_EXTERN_CXX_LIBS}
)
